package com.neuedu.hrbu.sca.controller;

import com.neuedu.hrbu.sca.entity.User;
import com.neuedu.hrbu.sca.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 作者: 张金山
 * 创建时间：2025/1/26 15:17   星期日
 * 描述： 用户Controller
 * 项目: spring-cloud-parent - com.neuedu.hrbu.sca.controller
 * 作者的博客:  https://blog.fulfill.com.cn
 */

@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserService userService;

    /**
     * http://localhost:8701/user/index
     * @return
     */
    @RequestMapping("/get/{uid}")
    public User getById(@PathVariable("uid") Integer uid){
        return userService.getById(uid) ;
    }
}
